<ol class="breadcrumb">
    <li><a href="#">奇妙云箱</a></li>
    <li><a href="/box/list">箱子管理</a></li>
    <li>奖品设置</li>
</ol>
<div class="panel panel-default">
    <div class="panel-heading">
        <span class="icon-gift icon-large"></span>
        <span class="panel-title">奖品列表</span>
    </div>
    <div class="table-responsive">
        <table class="table table-hover table-striped">
            <thead>
            <tr>
                <th>门号</th>
                <th>奖品名称</th>
                <th>奖品图片</th>
                <th>奖品价格</th>
                <th>活动价格</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <% datas.forEach(function(door){ %>
            <tr>
                <td><label style="text-align: center"><%= door.index %></label>
                </td>

                <td>
                    <%= door.name %>
                </td>
                <td>
                    <img src="<%= door.imgurl %>"
                         style="width: 50px;height: 50px;"/>
                </td>
                <td>
                    <%= door.price %>
                </td>
                <td>
                    <%= door.discount_price %>
                </td>
                <td>
                    <% if(!door.prize_id){ %>
                    <a class="btn btn-default btn-sm"
                       href="/box/prize/edit?boxid=<%= boxid %>&&index=<%= door.index %>">编辑</a>
                    <a class="btn btn-danger btn-sm"
                       href="/box_management/reBinding?boxid=<%= boxid %>&&index=<%= door.index %>">清除设置</a>
                    <% }else{ %>
                    <a class="btn btn-default btn-sm"
                       href="/box/prize/set?boxid=<%= boxid %>&&index=<%= door.index %>">设置</a>
                    <% } %>
                </td>
            </tr>
            <% }); %>
            </tbody>
        </table>
    </div>
</div>